package com.youths.dao;

import com.youths.domain.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: KingRainGrey
 * Date: 2020/7/14
 */
public interface TaskMapper {
    int add(Task task);

    int update(@Param("expertId") Integer expertId,
               @Param("state") Integer state,
               @Param("taskId") Integer taskId);

    int querySliceId(Integer taskId);
    int queryTaskId(Integer slicingId);

    int updateState(Integer state, Integer taskId);

    List<Task> list(@Param("state") Integer state);

    List<Task> query(@Param("expertId") Integer expertId);

    List<Task> getAll(Task task);

    Integer getTotal(Integer state, Integer expertId);

    List<Task> getRecords(Task task);

    Integer getRecordNum(Integer expertId);

    List<Task> getList(@Param("slicingId") Integer slicingId,
                       @Param("expertId") Integer expertId,
                       @Param("slices") List<Slice> slices,
                       @Param("expertInfos") List<ExpertInfo> expertInfos,
                       @Param("state")Integer state);

    Integer updateTask(@Param("expertId") Integer expertId,
                       @Param("taskId") List<String> taskId);

    Integer cancelTask(@Param("taskId") List<String> taskId);
}
